Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI/DataTable: initialize with Order and Range #8106

Merged
merged 4 commits into from
Sep 30, 2024

Conversation

nhaagen
Copy link
Contributor

@nhaagen nhaagen commented Sep 25, 2024

https://mantis.ilias.de/view.php?id=41328

Optionally initialize a DataTable with Range and/or Order.

This includes the fix from #8083
Also, I removed withNumberOfRows/getNumberOfRows from the interface in favour of (allready existing) get-/withRange.

@nhaagen nhaagen changed the title UI/data table/initialize UI/DataTable: initialize with Order and Range Sep 25, 2024
@nhaagen nhaagen force-pushed the UI/DataTable/initialize branch from 552c12f to 94658d1 Compare September 25, 2024 08:55
Copy link
Member

@klees klees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 2.

Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nhaagen,

Thx a lot for your contribution to the UI framework.

About the concrete changes, please answer the following questions:

  • Data::withNumberOfRows() usages: could you check if there are any usages of this method inside ILIAS? And, it it is not too much work, maybe directly replace these calls, so we can request reviews in this PR.

Otherwise this LGTM and should solve both mantis issues. Since we are removing an interface method, we need to go to JF before we can merge this.

Kind regards,
@thibsy

@nhaagen
Copy link
Contributor Author

nhaagen commented Sep 30, 2024

There were, in fact, but two occurences of "withNumberOfRows"; I replaced those.
@chfsx, maybe you want ot check on those.

)->withNumberOfRows(
$this->request->getItemsPerPage()
)->withRange(
new Range(0, $this->request->getItemsPerPage())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nhaagen Wouldn't that mean that only the first X entries are displayed? Or would the pagination itself then update that? I'm just a little confused about the static “0”.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nhaagen Ok, I think I understand it now, it's really just about the default values :-) That's fine with me, thank you very much!

Copy link
Contributor

@thibsy thibsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx @nhaagen for investigating and @chfsx for the quick review.

This LGTM now. I will merge this when accepted by JF.

Kind regards,
@thibsy

@thibsy
Copy link
Contributor

thibsy commented Sep 30, 2024

@nhaagen just noticed there's something wrong with the code-style of the changed files. Could you amend this, before we merge? Thx!

@matthiaskunkel
Copy link
Member

Jour Fixe, 30 SEP 2024: We accept the suggested changes for ILIAS 10/trunk.

@thibsy thibsy merged commit 91c7516 into ILIAS-eLearning:trunk Sep 30, 2024
3 checks passed
oliversamoila pushed a commit to oliversamoila/ILIAS that referenced this pull request Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix kitchen sink php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants